package dome1;

public class Text {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        list.addIndex(0,1);
        list.addIndex(1,2);
        list.addIndex(2,3);
        list.addIndex(3,4);
        list.addIndex(0,1);
        list.addIndex(1,2);
        list.addIndex(2,3);
        list.addIndex(3,4);
//        list.remove(2);
        list.display();
        list.removeAllKey(2);
        list.display();
        list.clear();
    }
    public static void main4(String[] args) {
        LinkedList list = new LinkedList();
        list.addIndex(0,1);
        list.addIndex(1,2);
        list.addIndex(2,3);
        list.addIndex(3,4);
        list.remove(2);
        list.display();
//        System.out.println(list.contains(1));
//        System.out.println(list.contains(0));
    }
    public static void main3(String[] args) {
        LinkedList list = new LinkedList();
        list.addIndex(0,1);
        list.addIndex(1,2);
        list.addIndex(2,3);
        list.addIndex(3,4);
        list.display();
    }
    public static void main2(String[] args) {
        LinkedList list = new LinkedList();
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.display();
    }
    public static void main1(String[] args) {
        LinkedList list = new LinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.display();
    }
}
